/*
 * @(#)FriendsListModel.java 0.0.1-SNAPSHOT
 *
 * Copyright Group B
 */
package grupb.upf.gui;

/**
 * <p>List of friends which extends the DefaultListModel.</p>
 * 
 * @version    0.0.1-SNAPSHOT
 * @author Group B
 */
public final class FriendsListModel extends javax.swing.DefaultListModel {

    /**
     * Method to get the name of the friends without the resource.
     * @param index the index of the user
     * @return the name without the resource
     */
    @Override
    public Object getElementAt(final int index) {
        return grupb.upf.util.Utilities.getUserName(
                (String) super.elementAt(index));
    }
    /**
     * Method to recovery the real name with the resource.
     * @param index the index of the user
     * @return the name with the resource
     */
    public String getUserAt(final int index) {
        return (String) super.elementAt(index);
    }
}
